package org.common.constant;

/**
 * 结果返回码
 *
 * @author 李坤
 * @date 2021/9/7 11:10
 */
public abstract class Code {

    /**
     * 操作成功
     */
    public static final int SUC = 200;

    /**
     * 重新加载token的值
     */
    public static final int RELOAD_TOKEN = 201;


    /**
     * 接口限流
     */
    public static final int SYSTEM_BUSY = 300;

    /**
     * 权限不足
     */
    public static final int NOT_AUTHORE = 301;

    /**
     * Token参数异常
     */
    public static final int TOKEN_ERROR = 302;

    /**
     * 参数错误
     */
    public static final int PARAM_ERROR = 303;

    /**
     * 系统请求异常
     */
    public static final int REQUEST_ERROR = 309;

    /**
     * 登录信息失效(2小时内未操作)
     */
    public static final int TOKEN_TIMEOUT = 310;

    /**
     * 令牌失效，请重新登录
     */
    public static final int TOKEN_INVALIDATION = 304;

    /**
     * 请勿频繁刷新
     */
    public static final int REFRESH_FREQUENTLY = 305;

    /**
     * 密码已被修改，请重新登录
     */
    public static final int PASSWORD_NOT_MATCH = 306;

    /**
     * 账号已被禁用
     */
    public static final int ACCOUNT_NOT_ENABLE = 307;

    /**
     * 账号已被删除
     */
    public static final int ACCOUNT_HAS_DELETED = 308;


    /**
     * 操作失败
     */
    public static final int FAIL = 400;

    /**
     * 系统错误
     */
    public static final int SYSTEM_ERROR = 401;

    /**
     * 验证码错误
     */
    public static final int VERITY_ERROR = 402;

    /**
     * 验证码超时
     */
    public static final int VERITY_TIMEOUT = 403;

    /**
     * 用户未登录
     */
    public static final int USER_NOT_LOGIN = 407;

    /**
     * 用户不存在
     */
    public static final int USER_NOT_EXITES = 404;

    /**
     * MySql更新失败
     */
    public static final int MYSQL_UPDATE_FAIL = 405;

    /**
     * 用户名或密码错误
     */
    public static final int NAME_OR_PASS_ERROR = 406;

    /**
     * 前端传参不符合验证规则
     */
    public static final int REQUEST_PARAM_ERROR = 408;


    /**
     * 用户名已存在
     */
    public static final int USERNAME_EXIST = 500;

    /**
     * 手机号已被注册
     */
    public static final int PHONE_NUMBER_EXIST = 501;

}
